# -*- coding:utf-8 -*-
from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import characterRecognitionConstants
class CharacterRecognitionSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(CharacterRecognitionSubDirectiveTree, self).__init__(parent)
        self.createCharacterRecognitionSubTreeNode()

    def createCharacterRecognitionSubTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "characterRecognitionOCR"
        self.setText(0, "文字识别OCR")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, characterRecognitionConstants.CharacterRecognitionConstants.universalCharacterRecognitionDirective, "通用文字识别")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, characterRecognitionConstants.CharacterRecognitionConstants.universalCharacterRecognitionIncludingPostionDirective, "通用文字识别(包含位置)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, characterRecognitionConstants.CharacterRecognitionConstants.tableRecognitionDirective, "表格识别")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, characterRecognitionConstants.CharacterRecognitionConstants.cardAndCredentialRecognitionDirective, "卡证识别")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, characterRecognitionConstants.CharacterRecognitionConstants.billRecognitionDirective, "票据识别")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, characterRecognitionConstants.CharacterRecognitionConstants.captchaRecognitionDirective, "验证码识别")